<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
    <%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<jsp:include page="/common/commonCss.jsp"/>
<jsp:include page="/common/commonJs.jsp"/>
<script src="${basePath }resources/scmPurOrder/scmPurOrder.js"></script>
<title>嘉童游乐中心-新增付款订单清单</title>

	<SCRIPT type="text/javascript">
	//是否进入流程
	var isInFlow =  '${isInFlow}';
	var basePath ='${basePath}';
	$(document).ready(function(){
		if(isInFlow == "1")
			{
			purOrderPrdDiv('${pkPurordId}','${oldSuppLyId}');
			}
	}); 

	</SCRIPT>
</head>
<body class="bg">
<div class="content m_auto">
	<div class="content_l mt10">
    	<ul>
        <shiro:hasPermission name="scmInvocing/productInfo/forwardToProductInfo.shtml">
    				  <li><a href="${basePath}scmInvocing/productInfo/forwardToProductInfo.shtml"><i class="nav_icon_b"></i><br>商品信息</a></li>
    		</shiro:hasPermission>
    		 <shiro:hasPermission name="scmInvocing/countUnit/forwardToUnitInfo.shtml">
    		 		<li><a href="${basePath}scmInvocing/countUnit/forwardToUnitInfo.shtml"><i class="nav_icon_b"></i><br>单位设置</a></li>
    		 </shiro:hasPermission>
    		 <shiro:hasPermission name="scmInvocing/supplier/forwardToSupply.shtml">
    		 		   <li><a href="${basePath}scmInvocing/supplier/forwardToSupply.shtml"><i class="nav_icon_a"></i><br>供应商信息</a></li>
    		 </shiro:hasPermission>
    		  <shiro:hasPermission name="scmInvocing/priceManager/forwardToList.shtml">
    		 		  <li><a href="${basePath}scmInvocing/priceManager/forwardToList.shtml"><i class="nav_icon_f"></i><br>价格管理</a></li>
    		 </shiro:hasPermission>
    		   <shiro:hasPermission name="scmInvocing/scmPurOrder/findInvoPurOrder.shtml">
            	  <li  class="content_hover"><a href="${basePath}scmInvocing/scmPurOrder/findInvoPurOrder.shtml"><i class="nav_icon_b"></i><br>采购订单</a></li>
    		 </shiro:hasPermission>
    		   <shiro:hasPermission name="scmInvocing/scmPayForm/findInvoOrderPay.shtml">
           		   <li><a href="${basePath}scmInvocing/scmPayForm/findInvoOrderPay.shtml"><i class="nav_icon_b"></i><br>付款申请</a></li>
    		 </shiro:hasPermission></ul>
    </div>
    <div class="content_r mt10">
    	<div class="p20">
         <div class="file_single_dl f14 fixed">
                <h1 class=""><font size="+1">采购订单清单</font></h1>
                <hr>
                <dl class="fixed" style="overflow:hidden"> 
                    
                     <c:choose>
		                  <c:when test="${type=='add'}">
		                      <dd><label>采购订单编号：</label></dd>
		                   </c:when>
		                    <c:otherwise>
		                          <dd><label>采购订单编号：</label>${pkPurordId}</dd>
		                     </c:otherwise>
                      </c:choose>
                </dl>
                <hr>
                <dl class="fixed" style="overflow:hidden">
                    <dd><label>制单人：</label>${applyName}</dd>
                    <dd><label>制单单位：</label>${brandName}</dd>
                    <dd>
                    <label>供应商：</label>
                      ${supplyName}
                    </dd>
                </dl>
                <hr>
            </div>
           
           
            <div class="mt10">
                <h1 class=""><font size="+1">采购商品目录</font></h1>
                        <table class="table">
                            <tr>
                                <th>序号</th>
                                <th>商品编号</th>
                                <th>商品名称</th>
                                <th>商品分类</th>
                                <th>规格</th>
                                <th>单位</th>
                                <th>协议单价(元)</th> 
                                <th>采购数量</th> 
                            </tr>
	                       		<%-- <c:if test="${isInFlow == '0'}"> --%>
	                        	<c:forEach items="${listScmSupPrd}" var="scmSuppPrd" varStatus="status">
		                			<tr>
			                		<td>${status.index+1}</td>
			                	 	<td>${scmSuppPrd.fkPrdId}</td>
			                		<td title="${scmSuppPrd.prdName}"> 
				                		<c:if test="${fn:length(scmSuppPrd.prdName)>15}">${fn:substring(scmSuppPrd.prdName,0,15)}...
										</c:if>
								   　　	<c:if test="${fn:length(scmSuppPrd.prdName)<=15}">${scmSuppPrd.prdName}</c:if>
	               					 </td>
	             	  		 		<td title="${scmSuppPrd.prdCateName}">
										<c:if test="${fn:length(scmSuppPrd.prdCateName)>13}">${fn:substring(scmSuppPrd.prdCateName,0,13)}...
										</c:if>
						   　　	  		 <c:if test="${fn:length(scmSuppPrd.prdCateName)<=13}">${scmSuppPrd.prdCateName}</c:if>
					  				</td>
			                		<td>${scmSuppPrd.prdSpec}</td>
			                		<td>${scmSuppPrd.unitName}</td> 
			                		<td>${scmSuppPrd.agmPriceOne}</td> 
			                		<td>${scmSuppPrd.purCnt }</td>
			                		</tr>
	     			  			 </c:forEach>
	                         <%--  </c:if> --%>
                        </table>
                       		<dl class="fixed order_dl">
                         	<!-- <dd><label><b>当前步骤：</b></label>总监审批</dd> -->
							<dd><label><b>处理历史：</b></label>
                        	<dd>
                            <table class="table" >
                                <tr>
                                    <th>时间</th>
                                    <th>处理人</th>
                                    <th>结果</th>
                                    <th>处理意见</th>
                                </tr>
                                 <c:forEach items="${hisWorkFlowList }" var="hisEntity" >
			                        <tr>
	                                    <td style="width:40%">${hisEntity.optTime }</td>
	                                    <td>${hisEntity.optName }</td>
	                                    <td>${hisEntity.result }</td>
	                                      <td title="${hisEntity.advice}">
	                                    <c:if test="${hisEntity.advice != null}">
	                                   	<c:choose>
	                                   		<c:when test="${hisEntity.advice.length()>80}">
	                                   			${hisEntity.advice.substring(0,80)}...
	                                  		 </c:when>
	                                   		<c:otherwise>
	                                    	${hisEntity.advice }
	                                   		</c:otherwise>
	                                    </c:choose>
	                                    </c:if>
	                                    </td>
	                                </tr>
		                        </c:forEach>
                            </table>
                        </dd>
            	</dl>
				<div class="btm_btn ">
                            <dl>
                              <dd><input class="btn" type="button" value="返回" onClick="javascript:window.location.href='${basePath}scmInvocing/scmPurOrder/findInvoPurOrder.shtml'"></dd>
                               <dd><input class="btn" type="button" value="打印" ></dd>
                                
                            </dl>
                        </div>
            </div>
        </div>
    </div>
</div> 
<div id="hide_loading">
	<div class="loading"></div>    
    <div class="loading_bg"></div>	
</div>
</body>
</html>